From: Jonas Dreßler Date: Wed, 26 Apr 2023 11:27:38 +0000 (+0200) Subject: screenshot: Also handle dbus service crashes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~337^2~2^2~101 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fd730a4db7093b4871b4559d1cd90d2967146eda;p=gnome-shell.git screenshot: Also handle dbus service crashes When the screencast dbus service crashes due to gstreamer, we should also handle that and not pretend to continue recording. Let's listen to g-name-owner changes for that and then also send a notification about it. Part-of: --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index d50a4f046..fa67ff2d7 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -1040,6 +1040,16 @@ var ScreenshotUI = GObject.registerClass({ this._screencastProxy.connectSignal('Error', () => this._screencastFailed()); + this._screencastProxy.connect('notify::g-name-owner', () => { + if (this._screencastProxy.g_name_owner) + return; + + if (!this._screencastInProgress) + return; + + this._screencastFailed(); + }); + this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' }); // The full-screen screenshot has a separate container so that we can